<?php
header("Content-Type:text/html; charset=utf-8");
require("../../inc/common.inc.php");
$fileinfo=$db->getinfo("select fpath from mx_sucai_file  where fid='$fid' limit 1");
$ftypearr = explode("/",$fileinfo["fpath"]);
$fname = $ftypearr[count($ftypearr)-1];

header("Content-type: application/octet-stream");  
header("Accept-Ranges: bytes");
header("Content-Disposition: attachment; filename=".$fname."");
@readfile("../..".$fileinfo["fpath"]);
?>